package page58;

public class Test5 {
    public static void main(String[] args) {
        int n = 10;
        int x = 8;
        int i;
        long sum = 0;
        long temp = 0;
        for (i = 0; i < n; i++) {
            temp += (long) x * (int) Math.pow(10, i);
            sum += temp;
        }
        System.out.println(sum);
    }
}
